package com.smart.car.finance.controller;

import com.smart.car.common.res.bean.ResponseResult;
import com.smart.car.common.res.exception.BusinessException;
import com.smart.car.finance.service.FinanceCardRechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("recharge")
public class FinanceCardRechargeController {

	@Resource
	FinanceCardRechargeService rechargeService;

	/**
	 * TODO 记录会员充值记录
	 * @author zoutao.blog.csdn.net
	 */
	@PostMapping("/create")
	public ResponseResult<Integer> create(String json) throws BusinessException {
		ResponseResult<Integer> commonResult = new ResponseResult<>();
		int rtn = rechargeService.create(json);
		commonResult.setData(rtn);
		return commonResult;
	}
}
